package com.example.service.Impl;


import com.example.entity.vo.SubEmpVO;
import com.example.mapper.SubEmpMapper;
import com.example.service.SubEmpService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class SubEmpServiceImp implements SubEmpService {



    @Autowired
    private SubEmpMapper subEmpMapper;
    /**
     * 项目获取人员列表
     * @param subId
     * @return
     */
    public List<SubEmpVO> getEmployee(int subId) {
        return subEmpMapper.getEmpByID(subId);
    }

    /**
     * 项目新增人员
     * @param subEmpVO
     */
    public void addEmployee(SubEmpVO subEmpVO) {
        subEmpMapper.addEmployee(subEmpVO);
    }

    /**
     * 项目删除人员
     * @param subEmpVO
     */
    public void deleteEmployee(SubEmpVO subEmpVO) {
        subEmpMapper.deleteEmployee(subEmpVO);
    }

    /**
     * 人员获取项目
     * @param empId
     * @return
     */
    public List<SubEmpVO> getSub(int empId) {
        return subEmpMapper.getSubById(empId);
    }
}
